package com.saltlux.tdd.paginate;

public class PaginateBuilder {
	public static final int DEFAULT_PAGESIZE = 10;
	public static final int DEFAULT_PAGEGROUPSIZE = 10;
	public static final int DEFAULT_CURRENTPAGE = 1;
	public static final int DEFAULT_totalDocumentCount = 0;
	private int _totalDocumentCount = DEFAULT_totalDocumentCount;
	private int _currentPage = DEFAULT_CURRENTPAGE;
	private int _pageSize = DEFAULT_PAGESIZE;
	private int _pagegroupSize = DEFAULT_PAGEGROUPSIZE;

	public void setTotalDocumentCount(int totalDocumentCount) {
		_totalDocumentCount = totalDocumentCount;
	}

	public Paginate build() {
		return new GroupedPaginate(_totalDocumentCount, _currentPage, _pageSize, _pagegroupSize);
	}

	public void setPageSize(int pageSize) {
		_pageSize = pageSize;
	}

	public void setPagegroupSize(int pagegroupSize) {
		_pagegroupSize = pagegroupSize;
	}

	public void setCurrentPage(int currentPage) {
		_currentPage = currentPage;
	}
	
}
